package BehaviorDesignPattern.StatePattern;

public class TestStatePattern {
    public static void main(String[] args) {
        Context context = new Context(new ConcreteStateA());

        context.request();  // 输出 "当前状态：A"

        context.setState(new ConcreteStateB());

        context.request();  // 输出 "当前状态：B"
    }
}
